<div class="fsh-pop">
    <div id="add_form" class="layui-form" lay-filter="add_form">
        <!-- 隐藏参数 -->
        <input name="test_id" type="hidden">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label"><i>*</i>标题</label>
                <div class="layui-input-block">
                    <input name="title" type="text" class="layui-input" lay-verify="required" >
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">LOGO</label>
                <div class="layui-input-block">
                    <div class="layui-upload">
                        <div class="layui-upload-list">
                            <input id="imgUrl" name="title_img" type="hidden">
                            <img id="upload_header" src="<%=title_img||''%>" style="width:50px;height:50px;"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <div class="layui-inline">
                <label class="layui-form-label"><i>*</i>开始时间</label>
                <div class="layui-input-block">
                    <input  id="startTime"  lay-verify="required" placeholder="请输入内容" class="layui-input"  name="startTime" readonly  >
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label"><i>*</i>结束时间</label>
                <div class="layui-input-block">
                    <input id="endTime"  lay-verify="required" placeholder="请输入内容" class="layui-input" name="endTime" readonly  >
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">试卷名称</label>
                <div class="layui-input-block">
                    <input id="_paper_title" class="layui-input" lay-verify="" readonly/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label"><i>*</i>试卷ID</label>
                <div class="layui-input-block">
                    <input id="_paper_id"  class="layui-input" lay-verify="required" readonly name="paper_id"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <div class="layui-inline">
                <label class="layui-form-label">附件</label>
                <div class="layui-input-block">
                    <input id="file_url" name="file_url" type="hidden">
                    <button id="imgUrl2"  class="layui-btn layui-btn-sm" lay-event="add">新增</button>
                    <a id="ahref" target="_blank" href="<%=file_url||'javascript:'%>">附件下载</a>
                </div>
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <div class="layui-inline">
                <label class="layui-form-label">提交答案</label>
                <div class="layui-input-block">
                    <textarea name="answer"></textarea>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    layui.use(['form', 'laydate'], function () {
        var form = layui.form;
        var layDate = layui.laydate;
        var _formObj = JSON.parse($('<div>').html('<%=$data%>').text()) || {};
        form.val("add_form", _formObj);
    });
</script>